package com.xb;

import com.xb.util.dbUtil;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * PreparedStatement小作业
 */
public class PreparedStatementHomeWork {
    //练习题1：从控制台向数据库的表customers中插入一条数据，表结构如下
    public static void main(String[] args) throws ParseException {
        String sql = "insert into customers(name,email,birth) values(?,?,?)";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date parse = simpleDateFormat.parse("2020-01-01");

        dbUtil.DclSql02(sql,"张敬轩","zjx@163.com",new java.sql.Date(parse.getTime()));
    }
}
